class MeshData{

    /**
     *
     * @param output
     * {
     *      positions:[]
     *      indices:[],
     *      normals:[],
     *      texCoords:[],
     *      sphere: {},
     *      wireFrame:{
     *          positions:positions,
     *          indices:[]
     *      },
     *      norm:{
     *          positions:[]
     *      },
     *      aabb:{
     *          positions:[],
     *          indices:[]
     *      }
     * }
     */
    constructor(output) {

        // 主要的数据
        this.positions = new Float32Array(output.positions);
        this.indices = new Uint16Array(output.indices);
        this.normals = new Float32Array(output.normals);
        this.texCoords = new Float32Array(output.texCoords);
        this.sphere = {
            radius:output.sphere.radius,
            center:output.sphere.center,
        };

        // 线框
        this.wireFrame = {};
        this.wireFrame.positions = this.positions;
        this.wireFrame.indices = new Uint16Array(output.wireFrame.indices);

        // 法线
        this.norm = {};
        this.norm.positions = new Float32Array(output.norm.positions);

        // aabb
        this.aabb = {};
        this.aabb.position = new Float32Array(output.aabb.positions);
        this.aabb.indices = new Uint16Array(output.aabb.indices);
    }
}

module.exports = MeshData;
